﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Betfairer
{
    public class Cell
    {
        public decimal Coefficient { get; set; }
        public decimal Amount { get; set; }

        public Cell(decimal coefficient, decimal amount)
        {
            Coefficient = coefficient;
            Amount = amount;
        }

        public override string ToString()
        {
            return String.Format("[{0}:{1}]", Coefficient, Amount);
        }

        public static Cell Empty
        {
            get
            {
                return new Cell(0, 0);
            }
        }

        public override bool Equals(object obj)
        {
            if (obj is Cell)
            {
                Cell cell = (Cell)obj;
                return cell.Coefficient == this.Coefficient && cell.Amount == this.Amount;
            }

            return false;
        }
    }
}
